/**
 * Created by dylan_Apple on 17/4/17.
 */
var express = require('express');
var router = express.Router();
var teamCtrl = require('../../controller/controller.team.js');

router.get('/getTeamInfo', function (req, res, next) {
    teamCtrl.getInfo(req.query, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});

router.post('/createTeam', function (req, res, next) {
    teamCtrl.create(req.body, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});

router.get('/getTeamList', function (req, res, next) {
    teamCtrl.getList(req.query, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});
router.get('/getListByRowIds', function (req, res, next) {
    teamCtrl.getListByRowIds(req.query, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});


module.exports = router;
